import {
    Button,
    Popup,
    Rate,
    Loading,
    Skeleton,
    Icon,
    Tab,
    Tabs,
    AddressEdit,
    Lazyload,
    Image as VanImage,
    Cell,
    CellGroup,
    Toast,
    PullRefresh,
    List,
    Swipe,
    SwipeItem,
    Stepper,
    ActionBar,
    ActionBarIcon,
    ActionBarButton,
    RadioGroup,
    Radio,
    ShareSheet,
    SwipeCell,
    AddressList,
    Area,
} from "vant";
import type { App } from "vue";

const vantComponents = [
    Button,
    Popup,
    Rate,
    Loading,
    Skeleton,
    Icon,
    Tab,
    Tabs,
    AddressEdit,
    Lazyload,
    VanImage,
    Cell,
    CellGroup,
    Toast,
    PullRefresh,
    List,
    Swipe,
    SwipeItem,
    Stepper,
    ActionBar,
    ActionBarIcon,
    ActionBarButton,
    RadioGroup,
    Radio,
    ShareSheet,
    SwipeCell,
    AddressList,
    Area
];

export default {
    install(app: App) {
        vantComponents.forEach((Component) => {
            app.use(Component);
        });
    },
};